package com.tanhua.server.controller;

import com.tanhua.model.mongodto.UserLocationDto;
import com.tanhua.server.service.BaiduService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.Map;

@RestController
@RequestMapping("/baidu")
public class BaiduController {

    @Autowired
    private BaiduService baiduService;

    /**
     * 上报地理位置
     * @return
     */
    @RequestMapping("/location")
    public ResponseEntity location(@RequestBody UserLocationDto dto){
        baiduService.location(dto);

        return ResponseEntity.ok(null);
    }
}
